package cn.dnui_jpf902.dnuifood_16110100902.controller;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import cn.dnui_jpf902.dnuifood_16110100902.R;

/**
 * Created by 姜鹏飞 on 2018/10/25.
 */


public abstract class BaseActivity extends AppCompatActivity {
    protected int layout_file = R.layout.activity_main;
    abstract void initViews();
    abstract void initEvents();
    abstract void initDatas();
    void setLayout(int layout_file) {
        setContentView(layout_file);
      }

     @Override
     protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setLayout(layout_file);
        initViews();
        initEvents();
        initDatas();

    }

}